package com.itzhigui.controller.admin;

import com.itzhigui.service.PayInfoService;
import com.itzhigui.service.PayService;
import com.itzhigui.utils.ResponseUtil;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 后台支付控制器
 * @Author: Zhangxy
 * @DateTime: 2023/11/17 10:34
 **/
@RestController
@Slf4j
@RequestMapping(value = "/admin/pay")
@Api(value = "后台支付控制器" ,tags = "AdminPayController")
public class AdminPayController {
    @Resource
    private PayInfoService payInfoService;

    @GetMapping(value = "/findAll")
    public ResponseUtil findAll(
            @PathVariable(value = "page") Integer page,
            @PathVariable(value = "pageSize") Integer pageSize
    ){
        return  payInfoService.findAll();
    }

    @GetMapping(value = "/find/{page}/{pageSize}")
    public ResponseUtil find(
            @PathVariable(value = "page") Integer page,
            @PathVariable(value = "pageSize") Integer pageSize
    ){
        return  payInfoService.find(page,pageSize);
    }
}
